#ifndef _c3dvalue_h_
#define _c3dvalue_h_


namespace NApiCfd
{
    /**
     * The C3dValue class represents a value in 3D space.
     * Note that all members are inline since there is little code to all of them
     */
    class C3dValue
    {
        public:
            C3dValue() {m_nX = 0; m_nY = 0; m_nZ = 0;}

            C3dValue(const C3dValue &val) {*this=val;}

            C3dValue(double x, double y, double z) {m_nX = x; m_nY = y; m_nZ = z;}

            C3dValue & operator=(const C3dValue& rh)
            {
                if(&rh!=this)
                {
                    m_nX = rh.m_nX;
                    m_nY = rh.m_nY;
                    m_nZ = rh.m_nZ;
                }

                return (*this);
            }

            ~C3dValue() {m_nX = 0; m_nY = 0; m_nZ = 0;}

            /** @return returns the x value */
			inline double x() const{return m_nX;}

			/** @return returns the y value */
            inline double y() const{return m_nY;}

			/** @return returns the z value */
            inline double z() const{return m_nZ;}

			/** Set the x value of the C3dValue */
            inline void setX(double x) {m_nX = x;}

			/** Set the y value of the C3dValue */
            inline void setY(double y) {m_nY = y;}
			
			/** Set the z value of the C3dValue */
            inline void setZ(double z) {m_nZ = z;}

        private:
            double m_nX, m_nY, m_nZ;
    };
}

#endif
